package com.lz.model;

import com.lz.domain.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

/**
 * @Package com.lz.model
 * @Project currency-trading
 * @Author lenovo
 * @Date 2022/1/12 20:20
 * @Describe 登录结果返回
 * @Version V1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "登录的结果")
public class LoginResult {
    /**
     * 登录成功的token，来自于authorization-server
     */
    @ApiModelProperty(value = "登录成功的token，来自我们的authorization-server 里面的")
    private String token;

    /**
     * 该用户的菜单数据
     */
    @ApiModelProperty(value = "该用户的菜单数据")
    private List<SysMenu> menus;

    /**
     * 该用户的权限数据
     */
    @ApiModelProperty(value = "该用户的权限数据")
    private List<SimpleGrantedAuthority> authorities;
}
